using UnityEngine;
using System.Collections;
using System;

public class LightHitInfo : IEquatable<LightHitInfo>{
	
	private Vector3 point;
	private Vector3 normal;
	private Vector3 direction;
	private Color lightColor;
	
	public LightHitInfo(){
		this.point = Vector3.zero;
		this.normal = Vector3.zero;
		this.direction = Vector3.zero;
		this.lightColor = Color.black;
	}
	
	public LightHitInfo(LightHitInfo h){
		this.point = h.Point;
		this.normal = h.Normal;
		this.direction = h.Direction;
		this.lightColor = h.LightColor;
	}
	
	public LightHitInfo(Vector3 point, Vector3 normal, Vector3 direction, Color lightColor){
		this.point = point;
		this.normal = normal;
		this.direction = direction;
		this.lightColor = lightColor;
	}
	
	public override string ToString ()
	{
		return string.Format ("[LightRayHitInfo: Point={0}, Normal={1}, Direction={2}, LaserColor={3}]", Point, Normal, Direction, LightColor);
	}
	
	public bool Equals (LightHitInfo h)
	{
		if (h == null)
        {
            return false;
        }
		
		return this.Point == h.Point && this.Direction == h.Direction && this.Normal == h.Normal && this.LightColor == h.LightColor;

	}
	
	public Vector3 Point {
		get {
			return this.point;
		}
		set {
			point = value;
		}
	}

	public Vector3 Normal {
		get {
			return this.normal;
		}
		set {
			normal = value;
		}
	}

	public Vector3 Direction {
		get {
			return this.direction;
		}
		set {
			direction = value;
		}
	}

	public Color LightColor {
		get {
			return this.lightColor;
		}
		set {
			lightColor = value;
		}
	}
	
}
